A supercapacitor provides power failure protection to a storage system in order to enable the storage system to operate reliably, and prevent the storage system from losing data that is being processed due to a power outage. Because the supercapacitor is a sensitive module, a problem about a life of the supercapacitor needs to be considered when the supercapacitor can satisfy supply of power. A temperature of an environment in which the supercapacitor is located and an operating voltage of the supercapacitor are important factors that affect the life of the supercapacitor. FIG. 1 is a relationship curve graph of a life of a supercapacitor, a charging voltage of the supercapacitor, and a temperature. The life of the supercapacitor is reduced by half each time the charging voltage is increased by 0.2 volts (V) when the temperature of the environment in which the supercapacitor is located stays the same. The life of the supercapacitor is also reduced by half each time the temperature is increased by 10° Celsius (C) when the charging voltage of the supercapacitor stays the same.
Because it is difficult to control the temperature of the environment in which the supercapacitor is located, in other approaches, the life of the supercapacitor is ensured by limiting a maximum value of the charging voltage. If the supercapacitor is required to operate for five years in an environment with a temperature of 50° C., it is obtained, according to the schematic diagram of the relationship curve shown in FIG. 1, that the maximum value of the charging voltage of the supercapacitor is 2 V. In other approaches, to satisfy all power supply needs of the storage system during a power failure and satisfy maximum power supply energy that is for power failure protection and that is needed by the storage system when the storage system operates in full load, the supercapacitor is charged according to the maximum value of the charging voltage of the supercapacitor. However, in practice, most storage systems rarely operate in full load. Therefore, power supply energy that is actually needed by the storage system during a power failure is lower than the maximum power supply energy that is for a power failure protection and that is needed by the storage system operating in full load, and a charging voltage that is actually needed by the supercapacitor is also lower than a maximum charging voltage. As shown in the relationship curve graph shown in FIG. 1, the life of the supercapacitor is reduced by half each time the charging voltage is increased by 0.2 V when the temperature of the environment in which the supercapacitor is located stays the same. The life of the supercapacitor is reduced if the supercapacitor is not charged according to the charging voltage that is actually needed by the supercapacitor but keeps being charged according to the maximum charging voltage.